home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Arsenal Files 6
/
The Arsenal Files 6 (Arsenal Computer).ISO
/
dosutils
/
sdl120.zip
/
SMARTDEL.DOC
< prev
next >
Wrap
Text File
|
1996-01-13
|
33KB
|
880 lines
SmartDelete v1.2
Copyright (C) 1995, 1996 by Mikhail Gershkovich
All Rights Reserved
January 13th, 1996
PURPOSE
SmartDelete is a utility which provides a fast and easy way to
delete files. It has many features lacking in the standard MS-DOS
DEL command, 4DOS's DEL command, as well as in other utilities that
claim to be "the best replacement of the DOS DEL command".
You won't find a faster, easier, more powerful, or more flexible way
to delete your files! Remember that this is a powerful program -
use it with caution!
FEATURES OVERVIEW
SmartDelete offers a wealth of features, including:
∙ Multiple file specifications on the command line
∙ Files may be selected for deletion according to their size,
date, time of creation, and attribute
∙ Files may be deleted from all subdirectories beneath the
specified directory
∙ You can delete empty directories
∙ Secure or Super Secure deletion - files may be deleted in such
a way that they cannot be undeleted
∙ Optional report generation - you may generate reports about
files that were deleted
∙ Optional confirmation - SmartDelete will prompt you before
each file is deleted
∙ A "test" mode which allows you to see the results of a
particular SmartDelete session without actually deleting any
files
∙ Includes support for "Quite mode" and "Full mode" to control
the way information about file is outputed.
∙ You may exclude files from the deletion process
∙ You may specify the maximum number of files that should be
deleted
The above features give you an exceptional flexibility in deleting
files. You will have no more hassle in figuring out how to delete
specific group of files. Refer to the PARAMETERS section of this
document for a complete explanation of all of SmartDelete's features
and how to use them.
PROGRAM REQUIREMENTS
Conventional Memory: 64K or greater
Operating System: MS-DOS 3.3+
Mouse required: No
Video required: Any
INSTALLATION
Simply extract the contents of SDL120.EXE into the directory in
which you'd like the SmartDelete files to reside.
SDL120.ZIP is a PZKIP archive - you will need PKUNZIP to uncompress
it.
Follows is one way you can install SmartDelete:
C:\>md SDEL
C:\>pkunzip -e sdl120 C:\SDEL
If you want, you can also manually update PATH enviroment variable
in your AUTOEXEC.BAT file
SmartDelete also includes FIXEXEC utility which updates AUTOEXEC.BAT
for SmartDelete could properly function. For more inforamtion on
FIXEXEC, please refer to FIXEXEC.DOC which is also included in the
archive.
Alternatively, you can simply extract the SmartDelete files into an
existing directory;
C:\>pkunzip -e sdl120 C:\UTILS
PARAMETERS
SMARTDEL filespec [/Ssize] [/Ddate] [/Cstring] [/A[:attribute]]
[/N] [/B] [/Mnumber] [/V] [/E] [/Y] [/Xfile_name]
[/Ttime] [/P] [/Rreport_file]
filespec
You should specify the filename on the command line when you
execute SmartDelete. You may use wildcards to specify group
of files.
Examples:
smartdel report.doc
Deletes file report.doc
smartdel *.tmp
Deletes all files in the current directory having
the extension ".TMP".
/A Allows you to select files according to their attributes.
Example:
/A:H - select files with the Hidden attribute set
/A:S - select files with the System attribute set
/A:R - select files with the Read-Only attribute set
/A - select files regardless of attribute
Note that if a file has multiple attributes set, it will be
selected for deletion if at least one of its attributes
satisfies the given condition. You can specify multiple
"/A" switches.
/B Tells SmartDelete to delete files in the specified directory
and in all of its subdirectories.
/C Enables Secure Mode.
╔═════════════════════════════════════════════════╗
║ WARNING!!!! ║
║ ║
║ If you delete files in Secure Mode, they cannot ║
║ be undeleted! Use this parameter with extreme ║
║ caution. ║
╚═════════════════════════════════════════════════╝
For more information on this feature, refer to the section
ERASING FILES IN SECURE MODE.
Examples:
smartdel *.* /CHello
Deletes files in Secure mode, overwriting their contents
with the word "Hello".
/D Allows you to add conditions to the "Delete by date" list of
conditions, allowing you to select files according to their
date.
For more information on this feature refer to the section
ERASING FILES ACCORDING TO THEIR DATE.
Examples:
smartdel *.doc /D-01/10/90
Deletes files that have extension .DOC and were created
prior to January 10, 1990
smartdel *.* /D=10/10/93
Deletes files created on October 10, 1993.
It also allows you to select files for deletion according to
to their age. You should specify ":" character right after /D
switch in order to enable this feature. For more information
on this feature refer to the section ERASING FILES ACCORDING
TO THEIR AGE.
Examples:
smartdel *.* /D:-150
Deletes files created exactly 150 days ago.
smartdel *.txt /D:12/03/92,(20
Deletes files that have extension .DOC and were created
less than 20 days prior to December 3, 1992.
/E Causes SmartDelete to confirm the deletion of each file.
When SmartDelete encounters a file satisfying all of the
specified conditions, you will be presented with the
following prompt:
Are you sure you want to delete FILENAME (Y/N/A)?
where FILENAME is the name of file that was found. If you
press "Y" or "y", the file will be deleted. If you press
"N" or "n", the file will be ignored and SmartDelete will
proceed to the next matching file. If you press "A" or "a",
SmartDelete will delete this file as well as all subsequent
files, with no further prompting.
/M Allows you to specify the maximum number of files to be
deleted. The default is 128,000.
Examples:
smartdel *.doc /M10
Delete all files having the extension .DOC, and the program
will stop when 10 files are deleted.
/N "Test mode" - forces SmartDelete to do everything except
actually delete the files. This option can be useful when
you want to see which files a particular combination of
switches will delete. If you want to see the file names of
the files that will be deleted, you may generate a report.
/O This option allows you to control what type of information
is outputed when file is being deleted. You can specify the
following characters after /O switch on command line:
/O+ Full mode. Information outputed in this mode is
identical to the information in report file
(name, size, date, time, attribute, and mode).
/O- Quiet mode. No information is being outputed to
the screen.
/O= The same as Quiet mode but in this mode information
about number of deleted files and number of bytes
freed will be outputed after session is completed.
If you do not specify anything after /O switch Quiet mode is
assumed.
/P Enables Super Secure Mode. Super Secure Mode is more
advanced than Secure Mode but it also requires more time.
Do not use it unless absolute security is necessary. You
must also specify the /C switch in order for this switch to
work.
/R Generate a report - the report will be outputted to the file
specified by "report_file". For more information refer to
the section GENERATING A REPORT.
/S Allows you to add conditions to the "Delete by size" list of
conditions, allowing you to select files according to their
size.
For more information on this option refer to the section
ERASING FILES ACCORDING TO THEIR SIZE.
Examples:
smartdel *.exe /S+40000
Deletes files that have the extension .EXE and whose size
exceeds 40 kilobytes.
smartdel *.* /S5000-10000
Deletes all the files whose size is in the range between 5
kilobytes and 10 kilobytes.
/T Allows you to add conditions to "Delete by time" list of
conditions, allowing you to select files according to their
time of creation.
For more information on this feature refer to the section
ERASING FILES ACCORDING TO THEIR TIME OF CREATION.
Examples:
smartdel *.txt *.bak /T-12:00
Deletes files that have the extension .TXT and .BAK and that
were created prior 12:00pm.
smartdel *.* /D=18:00
Deletes all files created before 6:00pm
/V Forces SmartDelete to remove directories as well as files.
This switch can only be used with the /B switch.
/X Allows you to exclude files from file deletion process.
SmartDelete will delete all files that satisfy given
condition except for "file_name". "File_name" can be any
valid DOS file name and may contain wildcards.
Example:
smartdel.exe *.* /X*.exe
Deletes all the files except for those that have extension
.EXE.
/Y Allows you to disable prompting for file erasure. This
option cannot be used with the /E parameter.
Note that, when using the "Delete by size", "Delete by date", and
"Delete by time" conditions, all conditions must be met else the
file will be rejected.
ABOUT SIZE, DATE AND TIME FORMATS
∙ Size in /S parameter must be specified in bytes:
Valid:
/S-10000 or /S-10k or /S-10K
Invalid:
/S-10kb
NOTE: When you use letters to specify the file's size,
SmartDelete makes the following assumptions:
1 kilobyte (1k) = 1,000 bytes
1 megabyte (1m) = 1,000,000 bytes
1 gigabyet (1g) = 1,000,000,000 bytes
1 kilobyte (1K) = 1,024 bytes
1 megabyte (1M) = 1,024 kilobytes = 1,048,576 bytes
1 gigabyte (1G) = 1,024 megabytes = 1,048,576 kilobytes
∙ Date in /D parameter may be specified in either mm/dd/yy or
mm-dd-yy format:
Valid:
/D10/31/92-11/31/93 or /D10-31-92-11-31-93
Invalid:
/D31/10/92-31/11/93 or /D31-10-92-31-11-93
∙ Date in /T parameter may be specified in either hh:mm or hh:mm:ss
format. Time must be specified in 24-hour format. Seconds are
optional.
Valid:
/T+13:30 or /T+13:30:00
Invalid:
/T+1:30a or /T+1:30:00a
ERASING FILES ACCORDING TO THEIR SIZE (/S command line option)
The "Delete by size" feature can work in the following modes:
∙ "/S=n" - Deletes files whose size is equal to a given size.
Example:
smartdel.exe *.* /S=0
∙ "/S+n" - Deletes files whose size is greater than a given
size.
Example:
smartdel.exe *.cpp *.txt /S+4000
∙ "/S-n" - Deletes files whose size is less than a given size.
Example:
smartdel.exe *.doc *.bak /S-20000
∙ "/S!n" - Deletes files whose size is not equal to a given
size.
Example:
smartdel.exe *.zip /S!10000
∙ "/Sn-m" - Deletes files whose size is in a given range.
Example:
smartdel.exe *.* /S5000-15000
ERASING FILES ACCORDING TO THEIR DATE (/D command line option)
The "Delete by date" feature can work in the following modes:
∙ "/D=date" - Deletes files whose date is equal to a given date.
Example:
smartdel.exe *.txt /D=01/10/94
∙ "/D+date" - Deletes files whose date is later than a given
date.
Example:
smartdel.exe *.* /D+10/15/92
∙ "/D-date" - Deletes files whose date is earlier than a given
date.
Example:
smartdel.exe /D-11/02/87
∙ "/D!date" - Deletes files whose date is not equal to a given
date.
Example:
smartdel.exe *.arj /D!01/01/95
∙ "/Ddate1-date2" - Deletes files whose date is in a given
range.
Example:
smartdel.exe *.* /D01/10/91-02/10/91
ERASING FILES ACCORDING TO THEIR AGE (/D: command line option)
The "Delete by age" feature can work in the following modes:
∙ "/D:date,+number_of_days" - Deletes files whose date is equal
to given date plus number_of_days. If date is omitted, current
date is assumed.
Example:
smartdel.exe *.* /D:10/05/94,+50
∙ "/D:date,-number_of_days" - Deletes files whose date is equal
to given date minus number_of_days. If date is omitted, current
date is assumed.
Example:
smartdel.exe *.doc /D:08/03/92,-10
∙ "/D:date,)number_of_days" - Deletes files whose date is in
between date and date plus numer_of_days. If date is omitted,
current date is assumed.
Example:
smartdel.exe *.bak /D:03/02/95,)15
∙ "/D:date,(number_of_days" - Deletes files whose date is in
between date minus numer_of_days and date. If date is omitted,
current date is assumed.
Example:
smartdel.exe *.* /D:04/01/95,(50
∙ "/D:date,]number_of_days" - Deletes files that were created
later than date plus numer_of_days. If date is omitted, current
date is assumed.
Example:
smartdel.exe *.bk! /D:02/18/93,]10
∙ "/D:date,[numer_of_days" - Deletes files that were created
prior to date minus number_of_days. If date is omitted, current
date is assumed.
Example:
smartdel.exe *.* /D:03/11/94,[70
ERASING FILES ACCORDING TO TIME OF CREATION (/T command line option)
The "Delete by time" feature can work in the following modes:
∙ "/T=time" - Deletes files whose time is equal to a given time.
Example:
smartdel.exe *.* /T=10:55
∙ "/T+time" - Deletes files whose time is later than a given
time.
Example:
smartdel.exe *.exe *.bat /T+17:00
∙ "/T-time" - Deletes files whose time is earlier than a given
time.
Example:
smartdel.exe *.com *.rep /T-15:30
∙ "/T!time" - Deletes files whose time is not equal to a given
date.
Example:
smartdel.exe *.* /T!12:23
∙ "/Ttime1-time2" - Deletes files whose time is in a given
range.
Example:
smartdel.exe *.txt /T12:53-17:44
ERASING FILES IN SECURE MODE
╔════════════════════════════════════════════════════╗
║ WARNING!!! ║
║ ║
║ Files deleted in Secure mode CANNOT be undeleted, ║
║ therefore use this feature only if truly required. ║
╚════════════════════════════════════════════════════╝
Secure mode is enabled with the "/Cstr" command line switch. "str"
specifies the string that you want SmartDelete to use to overwrite
file with.
Example:
smartdel *.bak /CGoodbye
Delete all the files with the extension .BAK and overwrite their
contents with "Goodbye".
Files deleted in this mode can be undeleted, but the file will be
filled with the character specified with the "/C" switch.
This switch is useful for deleting files containing confidential
information.
If you need absolute security and you want to ensure that no one
will be able to undelete files you have erased, use the /P switch.
The /P switch may only be used with the /C switch. The /P switch
enables "Super Secure Mode", which will cause selected files to be
overwritten seven times. Furthermore, the directory entry for that
file will be removed making undeletion impossible.
GENERATING A REPORT
If you would like to generate a report about the files that were
deleted, you can do so with the /R command line parameter. You must
specify the name of the report file following the /R parameter. The
file name can be any valid DOS name, such as REPORT.DOC.
If you want your report to be printed to the printer, you must
specify PRN as the file name. The report will contain information
on the name, size, creation date, creation time, deletion mode
(secure or quick), and overwrite character of each deleted file.
If you will not specify file name for a report file, default.rpt is
assumed.
ERRORLEVELS
On exit, SmartDelete sets the MS-DOS "ERRORLEVEL" variable. You can
test "ERRORLEVEL" for certain values in order to determine how
SmartDelete completed its work. The errorlevels are:
0 Normal exit. SmartDelete completed its job with no errors.
1 The /P switch was specified without the /C switch.
2 SmartDelete could not find any files satisfying the given
conditions.
3 CTRL-BREAK Handler initialization error. This is an
internal, unrecoverable, error.
4 Error occurred attempting to open the report file. This
could mean that either disk is full or there is no more
space left for directory entries.
5 Error occurred writing the report file. Usually due to a
disk full condition.
6 Change directory error. An error occurred while the program
tried to change to the directory specified in the path name
of one of the files. Usually caused by the fact that given
path name does not exist.
7 Change drive error. An error occurred while the program
tried to change to the drive specified in the path name of
one of the files. Usually caused by either an invalid
drive, or a non-existent disk in a removable drive.
8 Invalid file size in /S parameter. The file size specified
in the /S parameter exceeds 2 gigabytes.
9 Invalid month value in /D parameter. The month value given
in the /D parameter exceeds 12.
10 Invalid day value in /D parameter. The day value given in
the /D parameter exceeds 31.
11 Invalid year value in /D parameter. The year value given in
the /D parameter exceeds 99.
12 Invalid hour value in /T parameter. The hour value given in
the /T parameter exceeds 24.
13 Invalid minute value in /T parameter. The minute value
given in the /T parameter exceeds 59.
14 Invalid seconds value in /T parameter. The second value
given in the /T parameter exceeds 59.
15 Invalid parameter. An invalid parameter was given on the
SmartDelete command line.
16 CTRL-BREAK program termination. You pressed CTRL-BREAK to
halt the program.
17 Memory allocation error. There is not enough memory for
SmartDelete to initialize.
18 FFlush error. This is an internal error generated when
SmartDelete could not flush its buffers. Usually caused by
an insufficient disk space condition.
19 Illegal size range. The starting size specified for the /S
parameter is illegal because it exceeds the ending size in
the range.
20 Illegal date range. The range specified for the /D
parameter is illegal because the starting date exceeds the
ending date in the range.
21 Illegal time range. The range specified for the /T
parameter is illegal because the starting time exceeds the
final time.
22 Too many files on command line. The maximum number of files
that can be specified on the command line is 8.
23 The user answered "NO" when was asked for confirmation.
24 This error is generated when nothing was specified on the
command line and online help was displayed.
25 Missing file specification. Generated when there were no
files specified on the command line.
26 Invalid value in /M parameter. The value specified for the
/M parameter exceeds 256,000.
27 Invalid "Delete by Size" mode.
28 Invalid "Delete by Date" mode.
29 Invalid "Delete by Time" mode.
30 SmartDelete exceeded maximum number of files. This error is
generated when SmartDelete exceeded the value specified for
the /M parameter.
31 Both the /Y and /E parameters specified.
32 /V switch given without the /B switch.
33 /R switch given more than once.
34 Illegal letter was specified in /S switch. Allowed letters
are G,g,K,k,M,m.
35 Illegal value was specified in /P switch. Value should be
more than 0 and less than 128.
REGISTERING SMARTDELETE
If you like using SmartDelete, and want to continue using it for
more than 30 days, you must register. To register, fill out the
form ncluded in ORDER.FRM and make a check or money order payable
to:
Mikhail Gershkovich
2145 Ocean Ave. #B2
Brooklyn, NY 11229
USA
All payments should be made in the US Currency. Registering this
product allows you to use the product for an unlimited period of
time. It also allows you to receive technical support, one free
upgrade, and provides for future discounted upgrades.
TECHNICAL SUPPORT
If you are a registered user and you encounter any kind of problem
or bug using SmartDelete, you may contact me and I will try to help
you as soon as possible. Non-registered users will be supported
during their evaluation period, but registered users have priority.
You may contact me in the following ways (in order of preference):
∙ INTERNET: If you have E-Mail access, you may send a message to
my Internet address, "michael.gershkovich@consultant.com".
An Internet E-Mail message is the fastest way to contact me,
as I usually read all of my Internet E-Mail first and reply to
those messages as soon as possible. I strive to answer these
messages in one day or less.
∙ Fido: If you have access to FIDO Netmail, you may send the
message to my FIDO Netmail address, 1:278/404. Message should
be addressed to Michael Gershkovich.
∙ RIME: If you have access to RIME, you can reach me via the
RIME Shareware conference by leaving the message to
Michael Gershkovich.
∙ Fido echoes: If you have access to Fido echoes, you can reach
me via Fido Shareware or Fido Shareware Support echoes by leaving
message to Michael Gershkovich.
∙ BBS: If you live in New York City, or you don't mind calling
New York-based BBSs, you can reach me at:
Overnight ][ BBS
(718) 980-5838
Brooklyn, NY, USA
Tommy DeMarzo, Sysop
Running PowerBoard v2.0
24 hours/day, 7 days/wk
Leave a message to Michael Gershkovich in the Michael
Gershkovich Support conference.
∙ US POSTAL SERVICE: If your problem does not demand an
immediate solution, or you do not have access to any of the
online services, you may send a letter or postcard to:
Mikhail Gershkovich
2145 Ocean Ave. #B2
Brooklyn, NY 11229
DISCLAIMER OF WARRANTY
Author hereby disclaims all warranties relating to this software,
whether expressed or implied, including without limitation any
implied warranties of fitness for a particular purpose. Author will
not be liable for any special, incidental, consequential, indirect
or similar damages due to loss of data or any other reason, even if
author has been advised of the possibility of such damages. In no
event shall liability of author for any damages ever exceed the
price paid for the license to use software, regardless of the form
of the claim. The person using the software bears all risk as to
the quality and performance of the software.
LICENSE AGREEMENT
You are free to use, copy and distribute SmartDelete for
noncommercial use only if the following conditions are met:
∙ No fee is charged for distribution of this product.
∙ The original contents of the archive as well as original
contents of all of its components is not modified in any way.
You are hereby granted a limited license to use this software for
noncommercial purposes for the period of time that does not exceed
30 days. If you would like to use this product for the period that
exceeds the time period of given license, or you would like to use
this software for the commercial purposes, you must register given
software by paying amount of $10 to the author. This will give you
a right to use given software for the unlimited period of time as
well as for commercial purposes. It will also entitle you to
receive one free upgrade.
TRADEMARKS
Trademarks of companies mentioned in this document appear solely for
identification purposes and are the property of their respective
companies.
DISTRIBUTION
The original archive, and any possible updates, may be found on the
following BBSes:
Overnight ][ BBS
(718)980-5838
Brooklyn, NY, USA
Tommy DeMarzo, Sysop
Running PowerBoard v2.0
24 hours/day, 7 days/wk
FIDO 1:278/404
The Consultant BBS
(718) 837-3236 (node 1)
Brooklyn, NY, USA
Jay Caplan, Sysop
Joe Negron, Co-Sysop
Running PCBoard v15.2
24 hours/day, 7 days/wk
You can also FREQ SmartDelete archive from the following boards:
Overnight ][ BBS
(718)980-5838
Brooklyn, NY, USA
Tommy DeMarzo, Sysop
Running PowerBoard v2.0
24 hours/day, 7 days/wk
FREQ 1:278/404
BlueDog BBS
(212)594-4425
New York, NY, USA
Philip Perlman, Sysop
Running Maximus/2 3.01
24 hours/day, 7 days/wk
FREQ 1:278/304
If you wish, you may upload the complete unmodified distribution
archive to other BBSes.
If you did not receive this archive as described above, the archive,
as originally distributed by me, may have been modified. See
DISTRIBUTION for a listing of BBSes where you should be able to get
the original archive.
This archive may not be modified, by either adding, removing, or
changing any of its contents, without the express written permission
of the author, Mikhail Gershkovich.
This archive (or any of its contents) may not be distributed as part
of any other archive (with the exception noted in the preceding
paragraph) without the express written permission of the author,
Mikhail Gershkovich.
ACKNOWLEDGEMENTS
This project came into existence due to the help and efforts of many
people. Please forgive me if I neglected to include anyone.
I'd like to thank the following Beta Testers who suggested many
improvements and pointed out bugs.
Leizer Portnoy
Joe Negron
John Bragazzi
Jack Hudgions
Samuil Brufman
Michael Popovsky
Frederick Sohn
David Lurie
Joe Negron also extensively revised and edited this documentation.
I also would like to thank Alexander Grinberg for his comments on
the source code and for his suggestions on the implementation of
some important program features.
And especially I would like to thank all members of my family.
Without them this project would not be ever implemented. Their
support helped me to make this project into what it is.